import request from '@/utils/request'

// 查询产量产能管理列表
export function listProductivity(query) {
  return request({
    url: '/work/productivity/list',
    method: 'get',
    params: query
  })
}

// 按年份统计产量
export function totalByYear(query) {
  return request({
    url: '/work/productivity/totalByYear',
    method: 'get',
    params: {
      createTime:query
    }
  })
}
// 按年份统计产量
export function totalByAll() {
  return request({
    url: '/work/productivity/totalByAll',
    method: 'get'
  })
}
// 按种子类型统计产量
export function totalByVariety(query) {
  return request({
    url: '/work/productivity/totalByVariety',
    method: 'get',
    params: {
      id:query
    }
  })
}

// 查询产量产能管理详细
export function getProductivity(productivityId) {
  return request({
    url: '/work/productivity/' + productivityId,
    method: 'get'
  })
}

// 新增产量产能管理
export function addProductivity(data) {
  return request({
    url: '/work/productivity',
    method: 'post',
    data: data
  })
}
// 新增产量产能管理
export function addProAll(data) {
  return request({
    url: '/work/productivity/addAll',
    method: 'post',
    data: data
  })
}
// 修改产量产能管理
export function updateProductivity(data) {
  return request({
    url: '/work/productivity',
    method: 'put',
    data: data
  })
}

// 删除产量产能管理
export function delProductivity(productivityId) {
  return request({
    url: '/work/productivity/' + productivityId,
    method: 'delete'
  })
}
